<?php

require_once 'Zend/Db/Table/Abstract.php';

class Application_Model_Appiontment extends Zend_Db_Table
{
    protected $_name = 'appointment';
    protected $_primary='id';
    
    public function changestatus($id,$status)
    {
        $app = $this->fetchRow("`id`=$id")->toArray();
        $data = array('status'=>$status);
        $this->update($data,"`id`=$id");
    }
    public function addastudent($id)
    {
        $app = $this->fetchRow("`id`=$id")->toArray();
        $data = array('countstudent'=>($app['countstudent']+1));
        $this->update($data,"`id`=$id");
    }
}

